<!-- <?php
/**
 * Created by PhpStorm.
 * User: adminstrator
 * Date: 2018/2/8
 * Time: 16:35
 */
header("Content-type:text/html;charset=utf-8");
date_default_timezone_set('PRC');
include_once("./Db_pdo.class.php");
echo '<pre>';
$DB=new Db_pdo("oweb","owebdb","jmftoweb123");
//$DB=new Db_pdo("root","root","jmshop");

$sql = 'SELECT datetime,id FROM jmft_news ';
$data= $DB->new_query($sql);
$data = $data->fetchAll(PDO::FETCH_ASSOC); 
// print_r($data);
foreach ($data as $key => $value) {
	$param['ctime'] = strtotime($value['datetime']);
	$DB->table("jmft_news")->where("id=".$value['id'])->update($param);
	print_r($param);
} -->